
<?php
  /*
    Copyright 2010 Persistent Systems Limited

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
   */

    /**
    * This code was generated by the tool 'PHPDataSvcUtil.php'.
    * Runtime Version:1.0
    *
    * Changes to this file may cause incorrect behavior and will be lost if
    * the code is regenerated.
    */

    require_once 'Context/ObjectContext.php';
    /**
    * Defines default OData Service URL for this proxy class
    */
    define("DEFAULT_ODATA_SERVICE_URL", "http://odata.witp.pine-entertainment.com/api/WhatIsThePicture");
    
   /**
    * @class:SaveGameDto
    * @type:EntityType
    * @key:ID
    */
    class SaveGameDto extends Object
    {
        protected $_entityMap = array();
        protected $_entityKey = array();
        protected $_relLinks  = array();
        protected $_baseURI;

    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.Int64
        */
        public $ID;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.String
        * @MaxLength:
        * @FixedLength:
        */
        public $UserName;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.String
        * @MaxLength:
        * @FixedLength:
        */
        public $AvatarUrl;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.String
        * @MaxLength:
        * @FixedLength:
        */
        public $Token;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.Binary
        */
        public $Data;
    

       /**
        * Function to create an instance of SaveGameDto
        * @param Edm.Int64 $ID
        */
        public static function CreateSaveGameDto(
            $ID)
        {   
            $SaveGameDto = new SaveGameDto();
            $SaveGameDto->ID = $ID;
            return $SaveGameDto;
        }

       /**
        * Constructor for SaveGameDto
        */
        public function __construct($uri = "")
        {
            $this->_objectID = Guid::NewGuid();
            $this->_baseURI = $uri;
    
            $this->_entityKey[] = 'ID';
        }

       /**
        * overring getObjectID() functon of Object class
        */
        public function getObjectID()
        {
            return $this->_objectID;
        }

       /**
        * This function returns the entity keys of this entity.
        */
        public function getEntityKeys()
        {
            return $this->_entityKey;
        }

       /**
        * This function set the entity keys of this entity.
        */
        public function setEntityKeys($entityKey)
        {
            $this->_entityKey = $entityKey;
        }

       /**
        * This function returns the related links of this entity.
        */
        public function getRelatedLinks()
        {
            return $this->_relLinks;
        }

       /**
        * This function set the related links of this entity.
        */
        public function setRelatedLinks($relLinks)
        {
            $this->_relLinks = $relLinks;
        }

       /**
        * Function for getting Entity Type Name corrosponding to navigation Name
        */
        public function getActualEntityTypeName($key)
        {
            if (array_key_exists($key, $this->_entityMap))
            {
                return ($this->_entityMap[$key]);
            }
            return $key;
        }
    }
  
   /**
    * @class:GameTurnDto
    * @type:EntityType
    * @key:ID
    */
    class GameTurnDto extends Object
    {
        protected $_entityMap = array();
        protected $_entityKey = array();
        protected $_relLinks  = array();
        protected $_baseURI;

    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.Int64
        */
        public $ID;
    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.Int32
        */
        public $ElapsedMinutes;
    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.Int64
        */
        public $FromPlayerId;
    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.Int64
        */
        public $ToPlayerId;
    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.Int64
        */
        public $CurrentPlayerId;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.Int32
        */
        public $TurnNumber;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.String
        * @MaxLength:
        * @FixedLength:
        */
        public $Image1;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.String
        * @MaxLength:
        * @FixedLength:
        */
        public $Image2;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.String
        * @MaxLength:
        * @FixedLength:
        */
        public $Image3;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.String
        * @MaxLength:
        * @FixedLength:
        */
        public $LastImage1;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.String
        * @MaxLength:
        * @FixedLength:
        */
        public $LastImage2;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.String
        * @MaxLength:
        * @FixedLength:
        */
        public $LastImage3;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.Binary
        */
        public $Data;
    

       /**
        * Function to create an instance of GameTurnDto
        * @param Edm.Int64 $ID
        * @param Edm.Int32 $ElapsedMinutes
        * @param Edm.Int64 $FromPlayerId
        * @param Edm.Int64 $ToPlayerId
        * @param Edm.Int64 $CurrentPlayerId
        */
        public static function CreateGameTurnDto(
            $ID, 
            $ElapsedMinutes, 
            $FromPlayerId, 
            $ToPlayerId, 
            $CurrentPlayerId)
        {   
            $GameTurnDto = new GameTurnDto();
            $GameTurnDto->ID = $ID;
            $GameTurnDto->ElapsedMinutes = $ElapsedMinutes;
            $GameTurnDto->FromPlayerId = $FromPlayerId;
            $GameTurnDto->ToPlayerId = $ToPlayerId;
            $GameTurnDto->CurrentPlayerId = $CurrentPlayerId;
            return $GameTurnDto;
        }

       /**
        * Constructor for GameTurnDto
        */
        public function __construct($uri = "")
        {
            $this->_objectID = Guid::NewGuid();
            $this->_baseURI = $uri;
    
            $this->_entityKey[] = 'ID';
        }

       /**
        * overring getObjectID() functon of Object class
        */
        public function getObjectID()
        {
            return $this->_objectID;
        }

       /**
        * This function returns the entity keys of this entity.
        */
        public function getEntityKeys()
        {
            return $this->_entityKey;
        }

       /**
        * This function set the entity keys of this entity.
        */
        public function setEntityKeys($entityKey)
        {
            $this->_entityKey = $entityKey;
        }

       /**
        * This function returns the related links of this entity.
        */
        public function getRelatedLinks()
        {
            return $this->_relLinks;
        }

       /**
        * This function set the related links of this entity.
        */
        public function setRelatedLinks($relLinks)
        {
            $this->_relLinks = $relLinks;
        }

       /**
        * Function for getting Entity Type Name corrosponding to navigation Name
        */
        public function getActualEntityTypeName($key)
        {
            if (array_key_exists($key, $this->_entityMap))
            {
                return ($this->_entityMap[$key]);
            }
            return $key;
        }
    }
  
   /**
    * @class:UploadBlobDto
    * @type:EntityType
    * @key:ID
    */
    class UploadBlobDto extends Object
    {
        protected $_entityMap = array();
        protected $_entityKey = array();
        protected $_relLinks  = array();
        protected $_baseURI;

    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.String
        * @MaxLength:
        * @FixedLength:
        */
        public $ID;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.String
        * @MaxLength:
        * @FixedLength:
        */
        public $RelativePath;
    

       /**
        * Function to create an instance of UploadBlobDto
        * @param Edm.String $ID
        */
        public static function CreateUploadBlobDto(
            $ID)
        {   
            $UploadBlobDto = new UploadBlobDto();
            $UploadBlobDto->ID = $ID;
            return $UploadBlobDto;
        }

       /**
        * Constructor for UploadBlobDto
        */
        public function __construct($uri = "")
        {
            $this->_objectID = Guid::NewGuid();
            $this->_baseURI = $uri;
    
            $this->_entityKey[] = 'ID';
        }

       /**
        * overring getObjectID() functon of Object class
        */
        public function getObjectID()
        {
            return $this->_objectID;
        }

       /**
        * This function returns the entity keys of this entity.
        */
        public function getEntityKeys()
        {
            return $this->_entityKey;
        }

       /**
        * This function set the entity keys of this entity.
        */
        public function setEntityKeys($entityKey)
        {
            $this->_entityKey = $entityKey;
        }

       /**
        * This function returns the related links of this entity.
        */
        public function getRelatedLinks()
        {
            return $this->_relLinks;
        }

       /**
        * This function set the related links of this entity.
        */
        public function setRelatedLinks($relLinks)
        {
            $this->_relLinks = $relLinks;
        }

       /**
        * Function for getting Entity Type Name corrosponding to navigation Name
        */
        public function getActualEntityTypeName($key)
        {
            if (array_key_exists($key, $this->_entityMap))
            {
                return ($this->_entityMap[$key]);
            }
            return $key;
        }
    }
  
   /**
    * @class:UserDto
    * @type:EntityType
    * @key:ID
    */
    class UserDto extends Object
    {
        protected $_entityMap = array();
        protected $_entityKey = array();
        protected $_relLinks  = array();
        protected $_baseURI;

    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.Int64
        */
        public $ID;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.String
        * @MaxLength:
        * @FixedLength:
        */
        public $UserName;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.String
        * @MaxLength:
        * @FixedLength:
        */
        public $AvatarUrl;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.String
        * @MaxLength:
        * @FixedLength:
        */
        public $Token;
    

       /**
        * Function to create an instance of UserDto
        * @param Edm.Int64 $ID
        */
        public static function CreateUserDto(
            $ID)
        {   
            $UserDto = new UserDto();
            $UserDto->ID = $ID;
            return $UserDto;
        }

       /**
        * Constructor for UserDto
        */
        public function __construct($uri = "")
        {
            $this->_objectID = Guid::NewGuid();
            $this->_baseURI = $uri;
    
            $this->_entityKey[] = 'ID';
        }

       /**
        * overring getObjectID() functon of Object class
        */
        public function getObjectID()
        {
            return $this->_objectID;
        }

       /**
        * This function returns the entity keys of this entity.
        */
        public function getEntityKeys()
        {
            return $this->_entityKey;
        }

       /**
        * This function set the entity keys of this entity.
        */
        public function setEntityKeys($entityKey)
        {
            $this->_entityKey = $entityKey;
        }

       /**
        * This function returns the related links of this entity.
        */
        public function getRelatedLinks()
        {
            return $this->_relLinks;
        }

       /**
        * This function set the related links of this entity.
        */
        public function setRelatedLinks($relLinks)
        {
            $this->_relLinks = $relLinks;
        }

       /**
        * Function for getting Entity Type Name corrosponding to navigation Name
        */
        public function getActualEntityTypeName($key)
        {
            if (array_key_exists($key, $this->_entityMap))
            {
                return ($this->_entityMap[$key]);
            }
            return $key;
        }
    }
  
   /**
    * @class:ServerInfoDto
    * @type:EntityType
    * @key:ID
    */
    class ServerInfoDto extends Object
    {
        protected $_entityMap = array();
        protected $_entityKey = array();
        protected $_relLinks  = array();
        protected $_baseURI;

    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.Int64
        */
        public $ID;
    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.DateTime
        */
        public $PstNow;
    

       /**
        * Function to create an instance of ServerInfoDto
        * @param Edm.Int64 $ID
        * @param Edm.DateTime $PstNow
        */
        public static function CreateServerInfoDto(
            $ID, 
            $PstNow)
        {   
            $ServerInfoDto = new ServerInfoDto();
            $ServerInfoDto->ID = $ID;
            $ServerInfoDto->PstNow = $PstNow;
            return $ServerInfoDto;
        }

       /**
        * Constructor for ServerInfoDto
        */
        public function __construct($uri = "")
        {
            $this->_objectID = Guid::NewGuid();
            $this->_baseURI = $uri;
    
            $this->_entityKey[] = 'ID';
        }

       /**
        * overring getObjectID() functon of Object class
        */
        public function getObjectID()
        {
            return $this->_objectID;
        }

       /**
        * This function returns the entity keys of this entity.
        */
        public function getEntityKeys()
        {
            return $this->_entityKey;
        }

       /**
        * This function set the entity keys of this entity.
        */
        public function setEntityKeys($entityKey)
        {
            $this->_entityKey = $entityKey;
        }

       /**
        * This function returns the related links of this entity.
        */
        public function getRelatedLinks()
        {
            return $this->_relLinks;
        }

       /**
        * This function set the related links of this entity.
        */
        public function setRelatedLinks($relLinks)
        {
            $this->_relLinks = $relLinks;
        }

       /**
        * Function for getting Entity Type Name corrosponding to navigation Name
        */
        public function getActualEntityTypeName($key)
        {
            if (array_key_exists($key, $this->_entityMap))
            {
                return ($this->_entityMap[$key]);
            }
            return $key;
        }
    }
  
   /**
    * @class:ChallengeDto
    * @type:EntityType
    * @key:ID
    */
    class ChallengeDto extends Object
    {
        protected $_entityMap = array();
        protected $_entityKey = array();
        protected $_relLinks  = array();
        protected $_baseURI;

    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.Int32
        */
        public $ID;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.String
        * @MaxLength:
        * @FixedLength:
        */
        public $Name;
    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.Int64
        */
        public $Point;
    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.Boolean
        */
        public $IsWin;
    

       /**
        * Function to create an instance of ChallengeDto
        * @param Edm.Int32 $ID
        * @param Edm.Int64 $Point
        * @param Edm.Boolean $IsWin
        */
        public static function CreateChallengeDto(
            $ID, 
            $Point, 
            $IsWin)
        {   
            $ChallengeDto = new ChallengeDto();
            $ChallengeDto->ID = $ID;
            $ChallengeDto->Point = $Point;
            $ChallengeDto->IsWin = $IsWin;
            return $ChallengeDto;
        }

       /**
        * Constructor for ChallengeDto
        */
        public function __construct($uri = "")
        {
            $this->_objectID = Guid::NewGuid();
            $this->_baseURI = $uri;
    
            $this->_entityKey[] = 'ID';
        }

       /**
        * overring getObjectID() functon of Object class
        */
        public function getObjectID()
        {
            return $this->_objectID;
        }

       /**
        * This function returns the entity keys of this entity.
        */
        public function getEntityKeys()
        {
            return $this->_entityKey;
        }

       /**
        * This function set the entity keys of this entity.
        */
        public function setEntityKeys($entityKey)
        {
            $this->_entityKey = $entityKey;
        }

       /**
        * This function returns the related links of this entity.
        */
        public function getRelatedLinks()
        {
            return $this->_relLinks;
        }

       /**
        * This function set the related links of this entity.
        */
        public function setRelatedLinks($relLinks)
        {
            $this->_relLinks = $relLinks;
        }

       /**
        * Function for getting Entity Type Name corrosponding to navigation Name
        */
        public function getActualEntityTypeName($key)
        {
            if (array_key_exists($key, $this->_entityMap))
            {
                return ($this->_entityMap[$key]);
            }
            return $key;
        }
    }
  
   /**
    * @class:QuicklyChallengeDto
    * @type:EntityType
    * @key:ID
    */
    class QuicklyChallengeDto extends Object
    {
        protected $_entityMap = array();
        protected $_entityKey = array();
        protected $_relLinks  = array();
        protected $_baseURI;

    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.Int64
        */
        public $ID;
    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.Int32
        */
        public $ElapsedMinutes;
    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.Int64
        */
        public $FromPlayerId;
    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.Int64
        */
        public $ToPlayerId;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.Int32
        */
        public $ImageIndex;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.Binary
        */
        public $Data;
    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.Int32
        */
        public $State;
    

       /**
        * Function to create an instance of QuicklyChallengeDto
        * @param Edm.Int64 $ID
        * @param Edm.Int32 $ElapsedMinutes
        * @param Edm.Int64 $FromPlayerId
        * @param Edm.Int64 $ToPlayerId
        * @param Edm.Int32 $State
        */
        public static function CreateQuicklyChallengeDto(
            $ID, 
            $ElapsedMinutes, 
            $FromPlayerId, 
            $ToPlayerId, 
            $State)
        {   
            $QuicklyChallengeDto = new QuicklyChallengeDto();
            $QuicklyChallengeDto->ID = $ID;
            $QuicklyChallengeDto->ElapsedMinutes = $ElapsedMinutes;
            $QuicklyChallengeDto->FromPlayerId = $FromPlayerId;
            $QuicklyChallengeDto->ToPlayerId = $ToPlayerId;
            $QuicklyChallengeDto->State = $State;
            return $QuicklyChallengeDto;
        }

       /**
        * Constructor for QuicklyChallengeDto
        */
        public function __construct($uri = "")
        {
            $this->_objectID = Guid::NewGuid();
            $this->_baseURI = $uri;
    
            $this->_entityKey[] = 'ID';
        }

       /**
        * overring getObjectID() functon of Object class
        */
        public function getObjectID()
        {
            return $this->_objectID;
        }

       /**
        * This function returns the entity keys of this entity.
        */
        public function getEntityKeys()
        {
            return $this->_entityKey;
        }

       /**
        * This function set the entity keys of this entity.
        */
        public function setEntityKeys($entityKey)
        {
            $this->_entityKey = $entityKey;
        }

       /**
        * This function returns the related links of this entity.
        */
        public function getRelatedLinks()
        {
            return $this->_relLinks;
        }

       /**
        * This function set the related links of this entity.
        */
        public function setRelatedLinks($relLinks)
        {
            $this->_relLinks = $relLinks;
        }

       /**
        * Function for getting Entity Type Name corrosponding to navigation Name
        */
        public function getActualEntityTypeName($key)
        {
            if (array_key_exists($key, $this->_entityMap))
            {
                return ($this->_entityMap[$key]);
            }
            return $key;
        }
    }
  
   /**
    * @class:AnswerDto
    * @type:EntityType
    * @key:ID
    */
    class AnswerDto extends Object
    {
        protected $_entityMap = array();
        protected $_entityKey = array();
        protected $_relLinks  = array();
        protected $_baseURI;

    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.Int64
        */
        public $ID;
    
       /**
        * @Type:EntityProperty
        * NotNullable
        * @EdmType:Edm.Int64
        */
        public $UserId;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.String
        * @MaxLength:
        * @FixedLength:
        */
        public $UserName;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.String
        * @MaxLength:
        * @FixedLength:
        */
        public $AvatarUrl;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.String
        * @MaxLength:
        * @FixedLength:
        */
        public $ImageUrl;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.String
        * @MaxLength:
        * @FixedLength:
        */
        public $Text;
    
       /**
        * @Type:EntityProperty
        * @EdmType:Edm.String
        * @MaxLength:
        * @FixedLength:
        */
        public $Token;
    

       /**
        * Function to create an instance of AnswerDto
        * @param Edm.Int64 $ID
        * @param Edm.Int64 $UserId
        */
        public static function CreateAnswerDto(
            $ID, 
            $UserId)
        {   
            $AnswerDto = new AnswerDto();
            $AnswerDto->ID = $ID;
            $AnswerDto->UserId = $UserId;
            return $AnswerDto;
        }

       /**
        * Constructor for AnswerDto
        */
        public function __construct($uri = "")
        {
            $this->_objectID = Guid::NewGuid();
            $this->_baseURI = $uri;
    
            $this->_entityKey[] = 'ID';
        }

       /**
        * overring getObjectID() functon of Object class
        */
        public function getObjectID()
        {
            return $this->_objectID;
        }

       /**
        * This function returns the entity keys of this entity.
        */
        public function getEntityKeys()
        {
            return $this->_entityKey;
        }

       /**
        * This function set the entity keys of this entity.
        */
        public function setEntityKeys($entityKey)
        {
            $this->_entityKey = $entityKey;
        }

       /**
        * This function returns the related links of this entity.
        */
        public function getRelatedLinks()
        {
            return $this->_relLinks;
        }

       /**
        * This function set the related links of this entity.
        */
        public function setRelatedLinks($relLinks)
        {
            $this->_relLinks = $relLinks;
        }

       /**
        * Function for getting Entity Type Name corrosponding to navigation Name
        */
        public function getActualEntityTypeName($key)
        {
            if (array_key_exists($key, $this->_entityMap))
            {
                return ($this->_entityMap[$key]);
            }
            return $key;
        }
    }
  
   /**
    * Container class WhatIsThePictureContext, Namespace: WhatIsThePicture.DataTransferObjects
    */
    class WhatIsThePictureContext extends ObjectContext
    {
    
        protected $_SaveGames;
        protected $_GameTurns;
        protected $_UploadBlobs;
        protected $_LookupUsers;
        protected $_ServerInfos;
        protected $_Challenges;
        protected $_QuicklyChallenges;
        protected $_Answers;
        
       /**
        * The constructor for WhatIsThePictureContext accepting service URI
        */
        public function __construct($uri = "")
        {
            if(strlen($uri) == 0)
            {
                $uri = DEFAULT_ODATA_SERVICE_URL;
            }

            echo $uri;

            if (Utility::reverseFind($uri, '/') != strlen($uri) - 1)
            {
                $uri = $uri . '/';
            }

            $this->_baseURI = $uri;
            parent::__construct($this->_baseURI);
            $this->_entities = array(
                                "SaveGames",
                                "GameTurns",
                                "UploadBlobs",
                                "LookupUsers",
                                "ServerInfos",
                                "Challenges",
                                "QuicklyChallenges",
                                "Answers");
            $this->_entitySet2Type = array(
                                            "savegames" => "SaveGameDto", 
                                            "gameturns" => "GameTurnDto", 
                                            "uploadblobs" => "UploadBlobDto", 
                                            "lookupusers" => "UserDto", 
                                            "serverinfos" => "ServerInfoDto", 
                                            "challenges" => "ChallengeDto", 
                                            "quicklychallenges" => "QuicklyChallengeDto", 
                                            "answers" => "AnswerDto");
            $this->_entityType2Set = array(
                                            "savegamedto" => "SaveGames", 
                                            "gameturndto" => "GameTurns", 
                                            "uploadblobdto" => "UploadBlobs", 
                                            "userdto" => "LookupUsers", 
                                            "serverinfodto" => "ServerInfos", 
                                            "challengedto" => "Challenges", 
                                            "quicklychallengedto" => "QuicklyChallenges", 
                                            "answerdto" => "Answers");

            $this->_association = array();

    
            $this->_SaveGames = new DataServiceQuery('/'.'SaveGames', $this);
            $this->_GameTurns = new DataServiceQuery('/'.'GameTurns', $this);
            $this->_UploadBlobs = new DataServiceQuery('/'.'UploadBlobs', $this);
            $this->_LookupUsers = new DataServiceQuery('/'.'LookupUsers', $this);
            $this->_ServerInfos = new DataServiceQuery('/'.'ServerInfos', $this);
            $this->_Challenges = new DataServiceQuery('/'.'Challenges', $this);
            $this->_QuicklyChallenges = new DataServiceQuery('/'.'QuicklyChallenges', $this);
            $this->_Answers = new DataServiceQuery('/'.'Answers', $this);

        }

    
        /**
         * Function returns DataServiceQuery reference for
         * the entityset SaveGames
         * @return DataServiceQuery
         */
        public function SaveGames()
        {
            $this->_SaveGames->ClearAllOptions();
            return $this->_SaveGames;
        }
    
        /**
         * Function returns DataServiceQuery reference for
         * the entityset GameTurns
         * @return DataServiceQuery
         */
        public function GameTurns()
        {
            $this->_GameTurns->ClearAllOptions();
            return $this->_GameTurns;
        }
    
        /**
         * Function returns DataServiceQuery reference for
         * the entityset UploadBlobs
         * @return DataServiceQuery
         */
        public function UploadBlobs()
        {
            $this->_UploadBlobs->ClearAllOptions();
            return $this->_UploadBlobs;
        }
    
        /**
         * Function returns DataServiceQuery reference for
         * the entityset LookupUsers
         * @return DataServiceQuery
         */
        public function LookupUsers()
        {
            $this->_LookupUsers->ClearAllOptions();
            return $this->_LookupUsers;
        }
    
        /**
         * Function returns DataServiceQuery reference for
         * the entityset ServerInfos
         * @return DataServiceQuery
         */
        public function ServerInfos()
        {
            $this->_ServerInfos->ClearAllOptions();
            return $this->_ServerInfos;
        }
    
        /**
         * Function returns DataServiceQuery reference for
         * the entityset Challenges
         * @return DataServiceQuery
         */
        public function Challenges()
        {
            $this->_Challenges->ClearAllOptions();
            return $this->_Challenges;
        }
    
        /**
         * Function returns DataServiceQuery reference for
         * the entityset QuicklyChallenges
         * @return DataServiceQuery
         */
        public function QuicklyChallenges()
        {
            $this->_QuicklyChallenges->ClearAllOptions();
            return $this->_QuicklyChallenges;
        }
    
        /**
         * Function returns DataServiceQuery reference for
         * the entityset Answers
         * @return DataServiceQuery
         */
        public function Answers()
        {
            $this->_Answers->ClearAllOptions();
            return $this->_Answers;
        }
    
       /**
        * Functions for adding object to the entityset/collection
        */
    
       /**
        * Add SaveGames
        * @param SaveGames $object
        */
      public function AddToSaveGames($object)
        {
            return parent::AddObject('SaveGames', $object);
        }
    
       /**
        * Add GameTurns
        * @param GameTurns $object
        */
      public function AddToGameTurns($object)
        {
            return parent::AddObject('GameTurns', $object);
        }
    
       /**
        * Add UploadBlobs
        * @param UploadBlobs $object
        */
      public function AddToUploadBlobs($object)
        {
            return parent::AddObject('UploadBlobs', $object);
        }
    
       /**
        * Add LookupUsers
        * @param LookupUsers $object
        */
      public function AddToLookupUsers($object)
        {
            return parent::AddObject('LookupUsers', $object);
        }
    
       /**
        * Add ServerInfos
        * @param ServerInfos $object
        */
      public function AddToServerInfos($object)
        {
            return parent::AddObject('ServerInfos', $object);
        }
    
       /**
        * Add Challenges
        * @param Challenges $object
        */
      public function AddToChallenges($object)
        {
            return parent::AddObject('Challenges', $object);
        }
    
       /**
        * Add QuicklyChallenges
        * @param QuicklyChallenges $object
        */
      public function AddToQuicklyChallenges($object)
        {
            return parent::AddObject('QuicklyChallenges', $object);
        }
    
       /**
        * Add Answers
        * @param Answers $object
        */
      public function AddToAnswers($object)
        {
            return parent::AddObject('Answers', $object);
        }
    

       /**
        * This function returns the entities.
        */
        public function getEntities()
        {
            return $this->_entities;
        }
    }
  
?>
  